(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 8.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       157,          7]
NotebookDataLength[     30803,        582]
NotebookOptionsPosition[     29698,        543]
NotebookOutlinePosition[     30042,        558]
CellTagsIndexPosition[     29999,        555]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{

Cell[CellGroupData[{
Cell["Valve33, 3-3 directional valve", "Section",
 PageWidth->WindowWidth,
 CellChangeTimes->{{3.5792771018555584`*^9, 3.579277104368702*^9}}],

Cell[CellGroupData[{

Cell["Component description", "Subsection",
 PageWidth->WindowWidth],

Cell["\<\
This subroutine simulates the flow trough a 3-3 directional valve.\
\>", "Text",
 PageWidth->WindowWidth],

Cell[CellGroupData[{

Cell[GraphicsData["Metafile", "\<\
CF5dJ6E]HGAYHf4PEfU^I6mgLb15CDHPAVmbKF5d0@0001>80@0006@000030000000007d0001L0000
00000000002f4`00N0h00215CDH00040R1<007P000080000000000000000000080<005P200100@00
l000000000000000000004H0001H1P00C0H004M4BD<1002000<0008o5n/00000=0H000402@000aX3
000901`0000001@0000V1Pl07P3ooooo100D0000EfmbI0h0CFUSLVmcKfId85M_LV@500002`800000
1@0000`2S02o01`0003k0Q001`000000_080000000000U=iLgAUK@00200000`0RP4000X0302:0@`0
RP4000X0100002d1000500000P41000070000?/2lol00000002@0@000004@00BE6U]IG<PCVEg859_
KF5^0:j7kGO@Inmg7@X:30002P040000;@4100D000090P00000300007P0700005PB<0;l000000100
000V1Pl05P3ooooo003ooooooooool40002=00000`0001h01@0002h1000000D0000:0P0000050000
2@8000001@000042oooo00L0003l0P4000000000100002d10P080000nP85004000000000100002d1
0`0400000`4800L0000B18`0S02o0<001@0000/24`4Z00D0000<0VT0T0050000309Y09001@0000@1
3@0000D0000^0AP0000500000P4100001@0000T2000000D000010_ooo`0300007P040000;@4200P0
003j0PH00@00000000040000;@4400D0000;0Q<1:P0700006`AJ0G@0=P5@00L0000K15X1U`0f0G<0
1`0001/4FP6j03H1UP050000508f0EX01@0001<2F@5J00D0000D0SH1O00500004`8f0G`01@0001@2
=`5m00D0000C0S/1O@050000508f0H`01@0001<2>`6<00D0000D0U@1O@0500004`9I0Gd01@0001@2
F@6P00D0000C0SH1[`050000509D0GX01@0001<2E06000D0000D0S/1N`0500004`8k0Gl01@0001@2
>`6:00D0000C0S/1S`070000o0800000000000@0000]0@D0300002@3101J05P1E`1A0Ed0D@5J05P1
3P0002@31@2_03H1Z@0m0Jl0?`6`03H1[`0f0@D0000D0TP1;@0500004`980E00300002@3101?04P1
B01;0DP0A@5?04P170000?/2m?l00000002@0@000004000@E6U]IG<0001/2`Z?YHO]Mjj7kGO@Inmg
K0/:S`002P040000;@4600L0000Q1@80F5I50C001`0002450P1>D2<1I00;00009PH?00`0ooooo`00
000000001@0001@2F@5m00D0000C0WX1O@0<000090<407d0FP6006D1O@1U0Gd0FP470000o0800?oo
o`0000@0000]0@L0300002@3101m07/1N@1_0Gd0K`5m07/12`0002H63`0<0?ooool10000000000/0
000V1Pl0303ooooo0000000000050000508D0G`01@0001<2=@5l00@0000]0@D0300002@3101l03@1
N@0Y0G`0:@5l03@1100002d11`0<000090<407`04`6001l1O00O0G`04`4;00009PH?00`0ooooo`40
000000002`0002H63`0<0?ooool00000000000D0000D0Q@1S00500004`8e0H`0100002d11@0<0000
90<408`0=06902T1S00Y0H`0=0440000;@4700`0000T0`@0S00C0I007`6<01l1S00C0@/0000V1Pl0
303ooooo0@000000000700008@D204iD8`6H00L0000Q1@80CT5^0F<01@0001@2=P5Y00D0000C0S/1
J@050000508k0FL01@0001<2>`5/00D0000D0SH1W`0500004`8f0Il01@0001@2=`6P00D0000C0S/1
X0050000508k0Ih01@0001<2>`6R00@0000W0Ooo10000?011@070000o0800?ooo`0000@0000]0@D0
20000?X200000000000000@0000]0@P0100002L1ool800009PH?00H0ooooo`40100002L1ool50000
0P410000100002d100030000000A0000300000P0000;0000400007h0001M00002@000100001n0000
G@0000X0000@0000000000000009000040000;l0002<0000DP0004`100010000400000L000000000
00000;`20000000000000U<0N@1c07@0I@1]00000000000000000000000000000000000000000000
00000000000000000000000000000000X?DB0;nEBP0<d?Mgooooobcd4P000000J?@B000@00040000
000C00PP000001<0000C05Sd4P0001<06O;hM`H0003P1Q<0000C08PY5@0`m180Hd7fMeSe4P3D;?Ug
H=SiMooooolLmA80E4OfMn064`1f2b66S?@B00008HK0FQ/02@000;ODkGL@0000000007H;8HH00240
`?@B0=W7kGMf2b66MP/QQP40003NVaH0]6G]Ma[e4P00000000000000000000000000000000010@41
0@410@41kGLU000030000040000B000030000040001B0000C0400080003coooo0000000000000000
T04000000004@00BE01Y06d0I@1c0200CP1U07L0801B06l0K@1Q06h0000000000000000000000000
0000000000000000000000002P2PmA80_iE:00c@mgOooooo;?@B0000001Xm180010000@0000001<0
220000004`0001<0F?@B00004`0Il_Qg1P000>064`0001<0R2TE033d4P1S@OIgF?DB0=@/nGMPf?Ug
oooooace4P1DAoIgh0HC07H;8HJ<m180000QQZCd4P0U0000`5XK07H;8HJba>eg30000<Sd4P0B0000
`5XK07H;8HIf2b660@0002RL5P0000008oDB0000000000000000000000000000000000410@410@41
0@7]MbD0000<00000P0001P0000<000000000240000800007P0001P00000000000000;l0002<0000
8@0000P0000F000030000000000H000030000000000I000030000?ooo`0U0000300000D0080U0000
300000P0080O000060000<00002o0000S00008`0000:0000400002X0000C0@002@000100002@0000
J@0000T0000@0000T00006T0000D0000300000d0000F0000300001P0000B000030000040000H0000
30000000000I000030000?ooo`0Q0000200002D0000<00001@00P2H0000L00000`0000H000010000
00000000000U0000300000<0000:0000400002X0000C0@00:`0001P0001@0000=P4007<0001I0@00
:`0001P0001c0000=P4009H0001I0@00:`0001P0002F0000=P400;T0001I0@006`000100001J0000
=P4003H0000@0000FP0005T1000K0000400007`0000f0@00=P000100001l0000=P4001/0000@0000
O@0003L1000f0000400007d0000k0@006`000100002<0000=P4003H0000@0000S00003/1000K0000
400007d0001D0@00=P000100001m0000F@4001/0000@0000X00005T1000f000040000:l0000f0@00
6`000100001j0000E04003H0000@0000P00005@1000K0000400007/0000k0@00=P000100001o0000
>`4001/0000@0000RP0003/1000f0000400008l0000k0@009`0001P0000400000000000000000000
9@0000`000040000EP0002`0000W0000=`0002d0000m0000100005X0F05G0541G@1A0EX0F05F0000
<00006l0000O0000M@0002L000050000[`0f0JT0?@6_03l1/00f0Jl0=P4K0000400002d000180@00
=P000100001@0000B04005H0000/00006P0002`0000P0000<P0000@0001?04P1B01;0DP0A@5?04P1
DP0004`100050000m?ooo`00000000000000090100000000100045@0J@1]06D0L`00000000000000
0000000000000000000000000000000000000000000000000000000000000?eo0>3mO`0000000000
0000000000000000J?@B13<7000c1`AI000400AI0004F@00IQ[]Mc<715U<m180`5XK063d4P000000
[O;hM`004`1`cQ@0000003cd4P30FQ/0_?@B0=@/nGM`f?UgooooohSd4P3LCOIg/0HC000050040000
00000=BN5P2Pm180Rkk]M`D0003<m180<B[`M`004`000000MP/QQP40003/WQH0e9hF01We4P000000
00000000000000000000000000010@410@410@41kGLU0000300000D0001D0000F00000D0000Q0000
4`0002h000010000000<@]bf3D8`0000A@400080001<00000000000000000000oooooooooom@0000
F01F00T000080000E00005P0000c00000`000440000@00000@00000034;L]Pe2I00002<100020000
C00000000000000000000?ooooooooooD00004h0D0090000200001/0000@0000O@0005T1000f0000
400007d0001j0@00EP0002`000190000?`0004/000190000100007d0FP6006D1O@1U0Gd0FP4W0000
600000H000000000oooo0000000U0000300000H0001F0000;00004D0001B0000B@0005`000040000
O@1k0GT0K`5m06l1O@1k0A/0000@0000O00001@1000f0000400007`0000e0@009@0000`000040000
EP0002`000150000500004P0000M0000100007`0=05i02T1O00Y0G`0=04U0000300000H0001F0000
;00004P000000000B`0000/000040000O00C0H007`5l01l1O00C0A/0000@0000S00001@1000f0000
400008`0000e0@009@0000`000040000EP0002`0001C0000500005H0000M0000100008`0=06902T1
S00Y0H`0=04U0000300000H0001F0000;00005H000000000F@0000/000040000S00C0I007`6<01l1
S00C0E@0001H0000H00000<0001_000040000040000000a2g;H=@YP0000S0@000P0004`000000000
00000000003ooooooooooe00001>05@02@0000T0001D0000F000038000160000@@0005<000010000
000<@]bf3D9S0000KP400080001<00000000000000000000oooooooooom@0000CP1100T000090000
6`000100001Y0000=P4003H0000@0000J@0003/1000K0000400006L0000k0@00=P000100001/0000
>`4001/0000@0000W`0003H1000f0000400009l0000f0@006`000100002P0000=`4003H0000@0000
X00003/1000K0000400009h0000k0@00=P000100002R0000>`400280000<0000ooooobP0000<0000
100002L0000H000010000000003oool0000002D0000<0000100002H0000L00001`00000000000000
00000000000U0000300000L0000R000030000?oooolR000030000?oooolB000030000040000U0000
30000040000U0000300000L0080U000030000000080`0000300000l0080U0000300000d0081;0000
4000000000050000:00000`000010000:00000`000020000:00000`000030000:00000`000040000
:00000`000050000:00000`000060000:00000`0000700003P0001@000000000400001@0
\>"], "Graphics",
 ImageSize->{122, 92},
 ImageMargins->{{0, 0}, {0, 0}},
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[GraphicsData["Metafile", "\<\
CF5dJ6E]HGAYHf4PEfU^I6mgLb15CDHPAVmbKF5d0@0001h<0@0006@0000000000@0003D1002H0000
000000000024<000I1P00215CDH0004031h00:h000080000000000000000000080<005P200100@00
l000000000000000000004H0001h2P00K0X004M4BD<1002000<006ZI]P/00000E0X000402@000bX5
000902d0000001@0000V1Pl07P3ooooo100D0000EfmbI0h0CFUSLVmcKfId85M_LV@500002`800000
1@0000`2k03E0A`0003k0Q001`000000_080000000000U=iLgAUK@00200000`0RP4000X0302:0@`0
RP4000X0100002d1000500000P41000070000?/2lol00000002@0@000004@00BE6U]IG<PCVEg859_
KF5^0:j7kGO@Inmg7@X:30002P040000;@4100D000090P00000300007P0700005PC/0=D100000100
000V1Pl05P3ooooo003oooooooooomP1003]00000`0001h01@0002h1000000D0000:0P0000050000
2@8000001@000042oooo00L0003l0P4000000000100002d10P080000nP85004000000000100002d1
0`0400000`4800L0000B1>`0k03E0ML11@0000/2B01J00D0000<0[40H@45000030:a06411@0000@1
3@0000D0000^0AP0000500000P4100001@0000T2000000D000010_ooo`0300007P0;00009PH?00`0
ooooo`000000000020000?X21P010000000000@0000]0@@01@0000/2B01J00D0000D0Y40dP050000
4`:A01811@0001@2PP0C0@D0000C0Y404`45000050:201<11@0001<2PP1D0@D0000D0Y40E0450000
4`:205@11@0001@2T@1D0@D0000C0Y40K@45000050:B06d11@0001<2]01]0@D0000D0[@0E0450000
4`:d06d11@0001@2``1D0@D0000C0[@0E045000050;301<11@0001<2``1D0@D0000D0[@04`450000
4`;301<11@0001@2]03B00D0000C0[@04`45000050;30=801@0001<2]03B00D0000D0/<0T@050000
4`;30=801@0001@2]02A00D0000C0/<0T@05000050:d07d01@0001<2]02A00D0000D0Y40O@050000
4`:d07d01@0001@2T@1m00D0000C0Y40T@05000050:A09401@0001<2PP2A00D0000D0X80T@050000
4`:20=801@0001@2PP3B00D0000C0Y40dP0;00009PH?00`0ooooo`40000000002`0002H63`0<0?oo
ool00000000000L0003l0P00oooo0000100002d11@0700006`B[09H1V`1J02d000120@D0000X0000
200000P0000100400000020000000000000000000000000000000?ooo`2Z0000E@000:X0001E0000
ZP0005D0002Z0000E@0000@0000]0@H0100002d10`0>000090<505/0Y@2E0JD0U@6X05/0Z01K0:D0
;@0004811@0002P000080000200000400@00000080000000000000000000000000000000oooo0?l0
003M0000o`0007L0003o0000g@000?l0001g0000100002d11`040000l04600h0000T0`D0F`2N09D1
WP2E0J80F`2R05/0WP040000;@4500@0003`0@L0100002d1100700006`Be0<h0T@2F00L0000K1;D0
D06A01P1;@0004811@0002P000080000200000400@00000080000000000000000000000000000000
oooo0:X0001E0000ZP0005D0002Z0000E@000:X0001E0000100002d11P040000;@4300h0000T0`D0
U`2Y0<d0Z@3=0:l0U`2_09L0Z@0]0000@P450000:00000P0000800000@010000000P000000000000
0000000000000000003oool0ZP0005D0002Z0000E@000:X0001E0000ZP0005D000040000;@4700@0
003`0@H03P0002@31@0I0JT0C`6Y04l1[`0I0Jl06@6Y02d000120@D0000X0000200000P000010040
0000020000000000000000000000000000000?ooo`3o0000g@000?l0001g0000o`000=d0003o0000
M`0000@0000]0@H010000?011`0>000090<509L0UP3=09H0c@2P09L0X02G09H0;@0004811@0002P0
00080000200000400@00000080000000000000000000000000000000oooo0?l0003M0000o`0007L0
003o0000g@000?l0001g0000100002d11`040000l04600h0000T0`D06@6F04l1UP1?0J006@6P01T1
UP040000;@4400D0000D0[80U`0500004`:b0<d01@0001@2/P0H0@D0000C0[80C`4;00009PH?00`0
ooooo`40000000001@0001@2J@3=00D0000C0YD0c@050000509Y0=801@0001<2S`3B00P0003j0PH0
0P00000000040000;@4600D0000D0[D0l`0500004`;b0?<01@0001@2D02b00D0000C0X80/P050000
509@03@11@0001<2PP0d0@@0000]0@@010000?011P050000509^0;l01@0001<2KP3/00L0003l0P00
00000000100002d11P040000l04700`0000T0`@0b`1^0<@0J`340740b`1^00`0000T0`@0d`1^0=X0
J`3J0740d`1^00/0000V1Pl0303ooooo000000000005000050:E01P11@0001<2J@0H0@D0000D0Xl0
4`4500004`9Y01<11@0001@2KP3i00D0000C0Vh09P4<000090<401X1KP0Q0F/08@5a01X1KP0<0000
90<40181KP0;0F/02`5a0181KP0;00009PH?00`0ooooo`400000000070000?/2m?l00000002@0@00
0004000@E6U]IG<0001f2`Z2YHO]Mjj7kGO@InmgMP/:PP002P040000;@4700L0000Q1@80CU1F0;H0
1`0002450P1>E5H0>@4700008@D204i1l@3k00P0000Q1@@0F45@<7T0g00800008@D405Q1E31X0>`0
1@0001@2XP2E0@D0000C0Z80^04<000090<409D1XP2L0Il0W06U09D1XP0700008@D205QFW`2T0@@0
000W0Ooo10000?011@070000o0800?ooo`0000@0000]0@D020000?X200000000000000@0000]0@P0
100002L1ool800009PH?00H0ooooo`40100002L1ool500000P410000100002d100030000000A0000
300000P0000;0000400003L1002L00002@000100000g0@00W00000X0000@00000000000000090000
40000=D1003/0000DP0004`100010000400000L00000000000000;`20000000000000U<0N@1c07@0
I@1]0000000000000000000000000000000000000000000000000000000000000000000000000000
X?DB0;nEBP0:1P40300000000038^bD4300002SYO@0:1P403=3gMooooom8m180000005Sd4P0001<0
6O;hM`H0003P1Q<0000C08PY5@0`m180002F0ESe4P3D;?UgH=SiMooooolLmA80E4OfMn064`1J2B6B
S?@B00008I;0FQ/02@000;ODkGL@0000000005X98I800240`?@B0=W7kGMJ2B6BFPTQTP40003NVaH0
]6G]Ma[e4P00000000000000000000000000000000010@410@410@41kGLU000030000040000B0000
30000040001B0000C0400080003coooo0000000000000000T04000000004@00BE01Y06d0I@1c0200
CP1U07L0801B06l0K@1Q06h00000000000000000000000000000000000000000000000002P2PmA80
_iE:00X60@0<000000000<Rk9@@<0000:>Um00X60@0<d?MgooooodSd4P000000F?@B00004`0Il_Qg
1P000>064`0001<0R2TE033d4P0009H1F?DB0=@/nGMPf?Ugoooooace4P1DAoIgh0HC05X98I:<m180
000QTZCd4P0U0000`5XK05X98I:ba>eg30000<Sd4P0B0000`5XK05X98I9J2B6B0@0002RL5P000000
8oDB0000000000000000000000000000000000410@410@410@7]MbD0000<00000P0001P0000<0000
00000240000800007P0001P00000000000000=D1003/00008@0000P0000F000030000000000H0000
30000000000I000030000?ooo`0U0000300000D0080U0000300000P0080O000060000=L1003E0@00
k0000>`0000:0000400005X0001800002@000100001Q0@00/@0000T0000@0000H@400;40000D0000
300000d0000F0000300001P0000B000030000040000H000030000000000I000030000?ooo`0Q0000
200002H0000L00000`0000H00001000000000000000U0000300000<0000:0000400005X000180000
6`000100003B0000T@0003H0000@00004P400940000K0000400001<100220000=P000100000C0@00
T@0001/0000@00004`400880000f0000400005@1002200006`000100001D0@00T@0003H0000@0000
E0400880000K0000400005@1002A0000=P000100001]0@00T@0001/0000@0000K@400980000f0000
400006d1002d00006`000100001D0@00]00003H0000@0000K@400;@0000K0000400005@100330000
=P000100001D0@00]00001/0000@00004`400<<0000f0000400005@1003300006`000100000C0@00
]00003H0000@00004`400<<0000K000040000=80002d0000=P000100000C0@00]00001/0000@0000
dP000<<0000f000040000=80002d00006`000100002A0000``0003H0000@0000dP000<<0000K0000
40000940002d0000=P000100002A0000``0001/0000@0000O@000;@0000f000040000940002d0000
6`000100001m0000T@0003H0000@0000O@000;@0000K0000400007d0002A0000=P000100002A0000
T@0001/0000@0000T@000940000f000040000940002200006`000100002A0000PP0003H0000@0000
dP000880000K000040000=8000220000=P000100003B0000T@0002L0000H000010000000003oool0
000002D0000<0000100002/0000H0000FP0009/0002E0@00ZP0005h0001`00001@000000000P0000
<0000500000P0000:00000P0000800000@010000000P0000000000000000000000000000003oool0
ZP0005D0002Z0000E@000:X0001E0000ZP0005D0000U0000300000D0000U0000300000P0081F0000
<0000040001B00005P4005D000050000F`2U09D1Y@2E0JP0F`2X05/0Y@1N0000L00000H000000000
80000300001@0000800002P000080000200000400@00000080000000000000000000000000000000
oooo0?l0003M0000o`0007L0003o0000g@000?l0001g00009@0000`000060000:00000`000050000
EP00030000010000C00001H1001?00001@0005/0WP2E0Ih0U@6R05/0XP1K09h09@0000`000040000
:00000`0000600009@0000`000030000:`0001P0002F0000T@000<d0002d0000:`0001P0000H0@00
T@0004l1002d0000GP0007000006000000000200000`0000D0000200000X0000200000P000010040
0000020000000000000000000000000000000?ooo`2Z0000E@000:X0001E0000ZP0005D0002Z0000
E@0002D0000<00001P0002D0000<00002000P5H0000`0000=P0005H0001V0000F`0000D0002G0:T0
c@2Y0<d0[`2G0:l0U`2Y05h0001`00001@000000000P0000<0000500000P0000:00000P000080000
0@010000000P0000000000000000000000000000003oool0ZP0005D0002Z0000E@000:X0001E0000
ZP0005D0000U0000300000D0000X0000300000H0001F0000<0000:T0001F0000f@0005/000050000
6@6Y04l1Z@1?0Jl06@6_01T1Z@1N0000L00000H00000000080000300001@0000800002P000080000
200000400@00000080000000000000000000000000000000oooo0?l0003M0000o`0007L0003o0000
g@000?l0001g00009@0000`000060000:00000`000050000EP000300000f0000A@0006H0001>0000
1@0009L0UP3=09H0c@2P09L0X02G09H0GP0007000005000000000200000`0000D0000200000X0000
200000P0000100400000020000000000000000000000000000000?ooo`3o0000g@000?l0001g0000
o`000=d0003o0000M`0002D0000<00001@0002P0000<00001P0005H0000`0000Z@0004D0003I0000
CP0000D0000I0IH0C`6F04l1X00I0J006@6F02D0000<00000`0001/0000@0000U`000;80000f0000
40000<d0002b00006`000100000H0@00/P0003H0000@0000C`400;80000K000040000<d0001Y0000
=P000100003=0000U@0001/0000@0000dP0006T0000f000040000=80002?00009P0001`000060000
1P00008000000000000002D0000<00001P0001/0000@0000l`000;D0000f000040000?<0003b0000
6`000100002b0000D00003H0000@0000/P000880000K0000400003@1001@0000=P000100000d0@00
PP0002D0000<00000`0002P0000<00001P0001/0000@0000_`0006h0000f000040000>`0001^0000
9`0001P00006000000000000000000009@0000`000060000:00000`000050000EP0002`0001N0000
7`0006@0000T000010000</0KP3406/0a01a0</0KP1F0000;00006/0000O0000L@0002@000040000
d`1^0=X0J`3J0740d`1^01/0000@0000604009D0000f0000400001P1001Y00006`000100000C0@00
S`0003H0000@00004`4006T0000K000040000?T0001^0000=P000100000V0@00KP0005H0000/0000
ZP0001l0002`0000900000@0000J0Fh08@5[0241L@0J0Fh0EP0002`0002L00007`000:<0000T0000
10000181KP0;0F/02`5a0181KP1B0000C04000D0003doooo0000000000000000T04000000004000@
E01Y06d0I@1c00000000000000000000000000000000000000000000000000000000000000000000
00000000nGOooooo7?@B0=a=mWN01Q<0l58C0?1B4`0000004`X@>3<719T000@01000063d4P0a:_1g
000C0000003`DQ<0H?@B0000002]l_Qg000C073>50000000??@B0060002lm180e2ciMg3HnGOooooo
R?@B0=a=mWN`1Q<0000D00@000000000O:@F0:3d4P2;_^eg1@000<cd4P0a:_1g000C0000001J2B6B
0@000:ZT5P1lY1H06ODB0000000000000000000000000000000000410@410@410@7]MbD0000<0000
1@0005@0001H0000D@000040001O00003P000040002LJPe2E`@=@[H0001F00000P0004`000000000
00000000003ooooooooooe00001>05002@0000P0001D0000F0000<D000010000e00000h000010000
W6X=@UL43D8i0@00EP000080001<00000000000000000000oooooooooom@0000CP1D00T000090000
E00005P0002>0000RP0009d0002G00000@0009aZ3D9G10e2n`000?4000020000C000000000000000
00000?ooooooooooD00004h0@@0900002@0005@0001T0000L`000200002?0000;@000040002LJPe2
E`@=@]`0001i0000100004`00000000000000000003ooooooooooe@0001H0440D00`00T000090000
200000L0001D0000I0000840000A0000WP0001h000010000W6X=@UL43D;/0000J00000@0001<0000
0000000000000000oooooooooomD0000F01105@0<00900002@0000T0000700006`000100002E0@00
XP0003H0000@0000^0400:80001F0000;00001H1001=00007@40058000040000U@6R09`1W`2L0JD0
U@6R05@0001H000090400480000b0@00C`000040002LJPe2E`@=@Z@1002O00000P0004`000000000
00000000003ooooooooooe00001H05H02@0000P0000R000030000?oooolX0000300000@0000W0000
600000@000000000oooo0000000U0000300000@0000V0000700000L0000000000000000000000000
9@0000`0000700008P0000`0003ooooo8P0000`0003ooooo4P0000`0000100009@0000`000010000
9@0000`0000700209@0000`000000020<00000`0000?00209@0000`0000=0020B`00010000000000
1@0002P0000<00000@0002P0000<00000P0002P0000<00000`0002P0000<0000100002P0000<0000
1P0002P0000<00001@0002P0000<00001`0000h0000D000000000100000D0000
\>"], "Graphics",
 ImageSize->{309, 151},
 ImageMargins->{{0, 0}, {0, 0}},
 ImageRegion->{{0, 1}, {0, 1}}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["System model", "Subsection",
 CellChangeTimes->{{3.504161099890625*^9, 3.504161102453125*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"domain", "=", "\"\<Hydraulic\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"displayName", "=", "\"\<Valve33\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{
  "brief", "=", "\"\<A load sensing hydraulic directional valve\>\""}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"componentType", "=", "\"\<ComponentQ\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"author", "=", "\"\<Petter Krus <petter.krus@liu.se>\>\""}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
  "affiliation", " ", "=", " ", 
   "\"\<Division of Fluid and Mechatronic Systems, Link\[ODoubleDot]ping \
University\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SetFilenames", "[", 
   RowBox[{"path", ",", "domain", ",", "displayName"}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ResetComponentVariables", "[", "]"}], ";"}]}], "Input",
 CellChangeTimes->{{3.503905077842648*^9, 3.503905079842648*^9}, {
   3.5039103076641607`*^9, 3.5039103985397425`*^9}, {3.5039164662834997`*^9, 
   3.5039164750178747`*^9}, {3.5039165143772497`*^9, 
   3.5039165189397497`*^9}, {3.5041051675625*^9, 3.504105226359375*^9}, {
   3.507570546125*^9, 3.507570569546875*^9}, {3.507570601046875*^9, 
   3.50757067696875*^9}, 3.507796401609375*^9, {3.507887022343302*^9, 
   3.507887057967846*^9}, {3.5078871702320337`*^9, 3.507887175028847*^9}, {
   3.5158208831437864`*^9, 3.51582092036206*^9}, {3.5158209798300486`*^9, 
   3.51582099300181*^9}, {3.522605661421875*^9, 3.522605661625*^9}, {
   3.565433404364499*^9, 3.5654334224825306`*^9}, {3.5695965311236906`*^9, 
   3.569596540324217*^9}, 3.5757721159132*^9, {3.5792775100129037`*^9, 
   3.5792775101679125`*^9}, {3.57927754456888*^9, 3.57927754561794*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"nodeConnections", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"HydraulicQnode", "[", 
      RowBox[{"p", ",", 
       RowBox[{"1.", "*", 
        RowBox[{"10", "^", "5"}]}], ",", "\"\<Pressure port\>\""}], "]"}], 
     ",", "\[IndentingNewLine]", 
     RowBox[{"HydraulicQnode", "[", 
      RowBox[{"t", ",", 
       RowBox[{"1.", "*", 
        RowBox[{"10", "^", "5"}]}], ",", "\"\<Tank port\>\""}], "]"}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"HydraulicQnode", "[", 
      RowBox[{"a", ",", 
       RowBox[{"1.", "*", 
        RowBox[{"10", "^", "5"}]}], ",", "\"\<Load port A\>\""}], "]"}]}], 
    "\[IndentingNewLine]", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.503919051294972*^9, 3.503919119154347*^9}, {
   3.503923736440875*^9, 3.503923751003375*^9}, {3.5039293570625*^9, 
   3.503929406765625*^9}, 3.50394250446875*^9, {3.50399668911909*^9, 
   3.5039966973713074`*^9}, {3.507548807751546*^9, 3.5075488260955305`*^9}, {
   3.515612779640625*^9, 3.515612784234375*^9}, {3.575649090069656*^9, 
   3.575649091319728*^9}, 3.579277137972624*^9, 3.5792834273963585`*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputVariables", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{"{", 
     RowBox[{
     "xv", ",", "0.", ",", "double", ",", "\"\<m\>\"", ",", 
      "\"\<Spool position\>\""}], "}"}], "\[IndentingNewLine]", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.571994842405704*^9, 3.571994911670148*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputParameters", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "rho", ",", "860.", ",", "double", ",", "\"\<kg/m3\>\"", ",", 
       "\"\<oil density\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Cq", ",", "0.67", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<Flow coefficient.\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Sd", ",", ".01", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<spool diameter\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Frap", ",", "1.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<Spool cricle fraction(P-A)\>\""}], "}"}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Frat", ",", "1.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<Spool cricle fraction(A-T)\>\""}], "}"}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Xap0", ",", "0.", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<Underlap\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Xat0", ",", "0.", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<Underlap\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Xvmax", ",", "0.01", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<Max opening\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "plam", ",", "10000.", ",", "double", ",", "\"\<Pa\>\"", ",", 
       "\"\<Turbulence onset pressure\>\""}], "}"}]}], "\[IndentingNewLine]", 
    "}"}]}], ";"}]], "Input",
 PageWidth->WindowWidth,
 CellChangeTimes->{{3.503916073562605*^9, 3.50391608476573*^9}, {
   3.5039161716261826`*^9, 3.503916172813698*^9}, 3.503919167716847*^9, {
   3.505588895375*^9, 3.5055889695*^9}, {3.505589016640625*^9, 
   3.505589034984375*^9}, {3.505589276125*^9, 3.505589277078125*^9}, {
   3.505590362109375*^9, 3.50559036675*^9}, {3.505590803484375*^9, 
   3.50559082509375*^9}, {3.5075449148100324`*^9, 3.507544933372048*^9}, {
   3.5075449813674784`*^9, 3.507545001403344*^9}, {3.507562171421875*^9, 
   3.50756217203125*^9}, {3.5158237803828354`*^9, 3.5158238002578354`*^9}, 
   3.57927714786719*^9, 3.579277240431484*^9, 3.5792851123017297`*^9}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"qpa", " ", "=", " ", 
   RowBox[{"Kspa", " ", 
    RowBox[{"signedSquareL", "[", 
     RowBox[{
      RowBox[{"pp", "-", "pa"}], ",", "plam"}], "]"}]}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"qta", " ", "=", " ", 
   RowBox[{"Ksta", " ", 
    RowBox[{"signedSquareL", "[", 
     RowBox[{
      RowBox[{"pt", "-", "pa"}], ",", "plam"}], "]"}]}]}], ";"}]}], "Input",
 CellChangeTimes->{
  3.504198984265625*^9, 3.505589001421875*^9, {3.5075513871678333`*^9, 
   3.5075513902618604`*^9}, {3.5158238134609604`*^9, 
   3.5158238195390854`*^9}, {3.579277152493455*^9, 3.5792771537245255`*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"Xpa", " ", "=", " ", 
   RowBox[{"limit", "[", 
    RowBox[{
     RowBox[{"xv", " ", "+", " ", "Xap0"}], ",", "0.", ",", 
     RowBox[{"Xvmax", " ", "+", " ", "Xap0"}]}], "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"Xta", " ", "=", " ", 
   RowBox[{"limit", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"-", "xv"}], " ", "+", " ", "Xap0"}], ",", "0.", ",", 
     RowBox[{"Xvmax", " ", "+", " ", "Xat0"}]}], "]"}]}], ";"}]}], "Input",
 CellChangeTimes->{{3.50558966315625*^9, 3.50558969203125*^9}, {
  3.5055897985*^9, 3.505589808*^9}, {3.507562582*^9, 3.507562588921875*^9}, {
  3.5792771584257936`*^9, 3.579277158981826*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"wpa", " ", "=", " ", 
   RowBox[{"pi", " ", "Sd", " ", "Frap"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"wta", " ", "=", " ", 
   RowBox[{"pi", " ", "Sd", " ", "Frat"}]}], ";"}]}], "Input",
 CellChangeTimes->{{3.5055896995*^9, 3.505589724359375*^9}, {
  3.5792771639981127`*^9, 3.5792771645531445`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"localExpressions", " ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"Ks", "==", 
      RowBox[{"Cq", "*", 
       FractionBox[
        RowBox[{"N", "[", 
         SqrtBox["2"], "]"}], 
        SqrtBox["rho"]]}]}], ",", "\[IndentingNewLine]", 
     RowBox[{"Kspa", "==", 
      RowBox[{"Xpa", " ", "wpa", " ", "Ks"}]}], ",", "\[IndentingNewLine]", 
     RowBox[{"Ksta", "==", 
      RowBox[{"Xta", " ", "wta", " ", "Ks"}]}]}], "\[IndentingNewLine]", 
    "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.5055892220625*^9, 3.505589231265625*^9}, 
   3.505589573890625*^9, 3.505813673194783*^9, {3.5058212753418417`*^9, 
   3.5058212802010612`*^9}, {3.5058213722606153`*^9, 3.505821373432453*^9}, {
   3.5075515846230235`*^9, 3.507551585263706*^9}, 3.507551672580868*^9, {
   3.5719028277643366`*^9, 3.571902864408801*^9}, {3.5792771689593964`*^9, 
   3.5792771869604263`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"systemEquationsDA", " ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"qp", " ", "==", " ", 
      RowBox[{"(", 
       RowBox[{"-", "qpa"}], ")"}]}], ",", "\[IndentingNewLine]", 
     RowBox[{"qt", " ", "==", " ", 
      RowBox[{"(", 
       RowBox[{"-", "qta"}], ")"}]}], ",", "\[IndentingNewLine]", 
     RowBox[{"qa", " ", "==", " ", 
      RowBox[{"(", 
       RowBox[{"qpa", "+", "qta"}], ")"}]}]}], "\[IndentingNewLine]", "}"}]}],
   ";"}]], "Input",
 CellChangeTimes->{{3.50754870493773*^9, 3.507548721672319*^9}, {
  3.5719027806054535`*^9, 3.5719028099647055`*^9}, {3.5792771950828905`*^9, 
  3.5792771972320137`*^9}, {3.579283492398076*^9, 3.579283496610317*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"systemBoundaryEquations", " ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"pp", " ", "==", " ", 
      RowBox[{"cp", " ", "+", " ", 
       RowBox[{"Zcpe", " ", "qp"}]}]}], ",", "\[IndentingNewLine]", 
     RowBox[{"pt", " ", "==", " ", 
      RowBox[{"ct", " ", "+", " ", 
       RowBox[{"Zcte", " ", "qt"}]}]}], ",", "\[IndentingNewLine]", 
     RowBox[{"pa", " ", "==", " ", 
      RowBox[{"ca", " ", "+", " ", 
       RowBox[{"Zcae", " ", "qa"}]}]}]}], "\n", "      ", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.50559120440625*^9, 3.50559120803125*^9}, {
   3.505591469296875*^9, 3.505591475125*^9}, {3.5075486382337513`*^9, 
   3.5075486907344227`*^9}, {3.51582107740806*^9, 3.5158210786736856`*^9}, {
   3.515900481708085*^9, 3.5159004828643227`*^9}, {3.5719027853790617`*^9, 
   3.571902819511922*^9}, 3.579277205856507*^9, {3.5792858268996024`*^9, 
   3.579285829321741*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"systemVariables", " ", "=", " ", 
   RowBox[{"{", 
    RowBox[{"qp", ",", "qt", ",", "qa", ",", "pp", ",", "pt", ",", "pa"}], 
    "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.503916309424025*^9, 3.5039163118146653`*^9}, 
   3.504160933453125*^9, 3.504161512171875*^9, {3.50416161690625*^9, 
   3.504161620484375*^9}, {3.579277211669839*^9, 3.5792772150070305`*^9}, 
   3.57928544833595*^9, {3.5792860101790853`*^9, 3.5792860165154476`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"variableLowLimits", " ", "=", " ", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"pp", ",", " ", "0"}], "}"}], ",", " ", 
     RowBox[{"{", 
      RowBox[{"pt", ",", " ", "0"}], "}"}], ",", " ", 
     RowBox[{"{", 
      RowBox[{"pa", ",", " ", "0"}], "}"}]}], "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.578503687973201*^9, 3.5785037499217443`*^9}, {
   3.5785038484203777`*^9, 3.5785038577239103`*^9}, 3.578506383342367*^9, {
   3.578506485618217*^9, 3.5785064856202173`*^9}, {3.578509817259776*^9, 
   3.578509821862039*^9}, 3.5792858912132807`*^9}],

Cell[BoxData[
 RowBox[{"Compgen", "[", "file", "]"}]], "Input"]
}, Open  ]]
}, Open  ]]
},
WindowSize->{878, 860},
WindowMargins->{{Automatic, 310}, {Automatic, 25}},
FrontEndVersion->"8.0 for Microsoft Windows (64-bit) (October 6, 2011)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[CellGroupData[{
Cell[579, 22, 142, 2, 71, "Section"],
Cell[CellGroupData[{
Cell[746, 28, 68, 1, 36, "Subsection"],
Cell[817, 31, 115, 3, 29, "Text"],
Cell[CellGroupData[{
Cell[957, 38, 6936, 88, 100, "Graphics"],
Cell[7896, 128, 10574, 133, 159, "Graphics"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[18519, 267, 100, 1, 36, "Subsection"],
Cell[18622, 270, 1733, 36, 172, "Input"],
Cell[20358, 308, 1153, 25, 112, "Input"],
Cell[21514, 335, 349, 9, 72, "Input"],
Cell[21866, 346, 2364, 53, 232, "Input"],
Cell[24233, 401, 621, 16, 52, "Input"],
Cell[24857, 419, 663, 16, 52, "Input"],
Cell[25523, 437, 336, 8, 52, "Input"],
Cell[25862, 447, 941, 21, 161, "Input"],
Cell[26806, 470, 741, 17, 112, "Input"],
Cell[27550, 489, 960, 20, 112, "Input"],
Cell[28513, 511, 479, 9, 31, "Input"],
Cell[28995, 522, 609, 14, 31, "Input"],
Cell[29607, 538, 63, 1, 31, "Input"]
}, Open  ]]
}, Open  ]]
}
]
*)

(* End of internal cache information *)
